BOT_NAME = 'air_history'
SPIDER_MODULES = ['air_history.spiders']
NEWSPIDER_MODULE = 'air_history.spiders'

USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36'

DOWNLOADER_MIDDLEWARES = {
   'air_history.middlewares.AreaSpiderMiddleware': 543,
}

ITEM_PIPELINES = {
   'air_history.pipelines.AirHistoryPipeline': 300,
}

import logging
logger = logging.getLogger()
logger.addHandler(logging.StreamHandler())
logger.addHandler(logging.FileHandler('C:/Users/hqs/Desktop/script/python/spider/bak/test.log', encoding='utf-8'))  # 再添一个FileHandler
logger.setLevel(logging.INFO)  # 输出所有大于INFO级别的log

logger.info('settings myprint settings.py 第八步')